<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<script src="js/vue-2.6.12.js"></script>
</head>
<body>

<div id="app">
	
	<input type="text"  v-model="name" >
	<button type="button" @click="getName">取值</button>
	
	
</div>


<script>
	
	let app = new  Vue({
	  
	  el:"#app",
	  data:{
	    name:"xiaobai"
	  },
	  methods:{
	    
	    getName(){
	      
	      alert(this.name);
	      
	    }
	    
	  },
	 
	  
	})
	
</script>

</body>
</html>